local zhenxi = fk.CreateSkill{
  name = "hanqing__zhenxi",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["hanqing__zhenxi"] = "震息",
  [":hanqing__zhenxi"] = "锁定技，当你受到伤害扣减体力至1后，你重置〖驱纵〗；当你回复体力至上限后，你增加1点体力上限并重置〖市义〗。",
}

zhenxi:addEffect(fk.HpChanged, {
  anim_type = "support",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(zhenxi.name) and
      player.hp == 1 and data.damageEvent and player:usedSkillTimes("hanqing__quzong", Player.HistoryGame) > 0
  end,
  on_use = function(self, event, target, player, data)
    player:setSkillUseHistory("hanqing__quzong", 0, Player.HistoryGame)
  end,
})

zhenxi:addEffect(fk.HpRecover, {
  anim_type = "support",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(zhenxi.name) and not player:isWounded()
  end,
  on_use = function(self, event, target, player, data)
    player.room:changeMaxHp(player, 1)
    player:setSkillUseHistory("hanqing__shiyi", 0, Player.HistoryGame)
  end,
})

return zhenxi
